<!--
 * @Author: zf
 * @Date: 2022-11-30 15:51:46
 * @LastEditTime: 2022-11-30 19:32:53
 * @Description: 
-->
<template>
  <div style="height: 300px;color: black;">
    <el-steps direction="vertical" :active="1">
      <el-step v-for="item in list" :key="item.coachName" :title="item.coachName" :description="item.courseName">
      </el-step>
    </el-steps>
  </div>
</template>
<script lang="ts">
import { onMounted, reactive, toRefs, watch } from "vue";
import { getRecordAppointment } from "../../http/api";
import { ListData } from "../../type/RecordAppointment";


export default ({
  setup() {
    onMounted(() => {
      //挂载时就获取数据
      getList(); //预约记录
    });

    //实例化ListData对象
    const data = reactive(new ListData());
    //获取表格数据接口
    const getList = () => {
      getRecordAppointment({ limit: 5 }).then((res: any) => {
        data.list = res.data;
        console.log(data.list);

      });

    };
    return {
      ...toRefs(data),


    };
  },
});
</script>
